// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:17

// Source File Name:   q2.java

package com.zelix;

import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.IOException;
import java.util.*;
import javax.swing.*;

//            g2, hc, jc, nc,
//            qc, ab, i1, fo, 
//            go, ho, zo, wp, 
//            to, yw, wu, f2, 
//            v3, es, zz, q4, 
//            m4, qz, uz, j0, 
//            tb

public class q2 extends g2
        implements ActionListener, KeyListener, PropertyChangeListener {

    JFrame d;
    yw e;
    nc f[];
    nc g[];
    JLabel h;
    m4 i;
    private v3 j;
    DefaultListModel k;
    HashSet l;
    JPanel m;
    JButton n;
    JButton o;
    JButton p;
    JButton q;
    JButton r;
    JButton s;
    JButton t;
    boolean u;
    boolean v;
    private static String z[];

    public q2(JFrame jframe, String s1, String s2, boolean flag, String s3, nc anc[], yw yw1) {
        l = new HashSet();
        d = jframe;
        u = flag;
        e = yw1;
        a(s1, s2, s3, anc);
        a(false);
        b(false);
        d(false);
        c(anc != null && anc.length > 0);
        zz.a(this, true);
        zz.b(n);
    }

    public void actionPerformed(ActionEvent actionevent) {
        Object obj = actionevent.getSource();
        if (obj == n) {
            p();
        } else if (obj == o) {
            j();
        } else if (obj == p)
            l();
    }

    void f() {
        t.setEnabled(true);
        zz.b(i);
    }

    void g() {
        t.setEnabled(true);
        f();
    }

    void h() {
        File afile[];
        int j1;
        afile = i.f();
        for (j1 = 0; j1 < afile.length; j1++) {
            if (l.add(afile[j1]))
                k.addElement(afile[j1]);
        }
        t.setEnabled(true);
    }

    void i() {
        File afile[];
        int j1;
        v();
        afile = i.f();
        for (j1 = 0; j1 < afile.length; j1++) {
//_L1:
            File afile1[];
            int k1;
            String s1 = afile[j1].getAbsolutePath();
            afile1 = i.a(afile[j1]);
            for (k1 = 0; k1 < afile1.length; k1++) {
                File file = afile1[k1];
                if (l.add(file))
                    k.addElement(file);
            }
        }
        t.setEnabled(true);
        u();
    }

    final void j() {
        v = true;
        a();
        e.a();
    }

    public final void a() {
        super.a();
        d.setEnabled(true);
        d.toFront();
        if (!v)
            e.a();
    }

    String[] k() {
        int j1;
        String as[];
        int k1;
        j1 = k.getSize();
        as = new String[j1];
        for (k1 = 0; k1 < j1; k1++) {
            as[k1] = ((File) k.getElementAt(k1)).getAbsolutePath();
        }
        return as;
    }

    public Action d() {
        return new i1(this);
    }

    protected final void l() {
        to.a(to.A);
    }

    public void keyPressed(KeyEvent keyevent) {
        if (keyevent.getKeyCode() == 10) {
            Object obj = keyevent.getSource();
            if (obj == n) {
                p();
            } else if (obj == o) {
                j();
            } else if (obj == p)
                l();
        }
    }

    public void keyReleased(KeyEvent keyevent) {
    }

    public void keyTyped(KeyEvent keyevent) {
    }

    void m() {
        String as[];
        int j1;
        as = k();
        if (as.length != 0) {
            g = new nc[as.length];
            for (j1 = 0; j1 < as.length; j1++) {
                g[j1] = new nc(as[j1]);
            }
            v = true;
            a();
            a(null, null);
        } else {
            new f2(this, z[7], z[6]);
        }
    }

    void n() {
        String as[];
        Hashtable hashtable;
        ArrayList arraylist;
        Vector vector;
        int j1;
        v();
        as = k();
        hashtable = new Hashtable(27);
        arraylist = new ArrayList();
        vector = new Vector();
        if (as.length != 0) {
            f = new nc[as.length];
            for (j1 = 0; j1 < as.length; j1++) {
                f[j1] = new nc(as[j1]);
            }
            String s1;
            es es1;
            int k1;
            s1 = System.getProperty(z[4]);
            es1 = new es(this);
            for (k1 = 0; k1 < as.length; k1++) {
                File file;
                String as1[];
                int l1;
                file = new File(as[k1]);
                if (!file.exists())
                    continue; /* Loop/switch isn't completed */
                if (file.isDirectory()) {
                    as1 = file.list(new jc());
                    for (l1 = 0; l1 < as1.length; l1++) {
                        String s2 = as[k1] + s1 + as1[l1];
                        vector.addElement(new nc(s2));
                    }
                } else if (file.getName().endsWith(z[2])) {
                    arraylist.add(file);
                } else {
                    try {
                        File file1 = wp.a(file);
                        wp.a(file1, vector, hashtable, null, null, file.getAbsolutePath(), null, es1);
                    }
                    catch (IOException ioexception) {
                        new f2(this, z[0], z[5] + qc.a + z[1] + ioexception);
                    }
                }
                hc ahc[];
                Enumeration enumeration;
                if (vector.size() == 0) {
                    new f2(this, z[7], z[3]);
                } else {
                    ahc = new hc[hashtable.size()];
                    enumeration = hashtable.elements();
                    for (l1 = 0; l1 < ahc.length; l1++) {
                        ahc[l1] = (hc) enumeration.nextElement();
                    }
                    int i2;
                    g = new nc[vector.size()];
                    for (i2 = 0; i2 < g.length; i2++) {
                        g[i2] = (nc) vector.elementAt(i2);
                    }
                    File afile[] = new File[arraylist.size()];
                    arraylist.toArray(afile);
                    a();
                    a(ahc, afile);
                }
            }
        } else {
            new f2(this, z[7], z[6]);
        }
        u();
        return;
    }

    int o() {
        int ai[] = j.getSelectedIndices();
        if (ai == null)
            return 0;
        else
            return ai.length;
    }

    void p() {
        v = true;
        if (u) {
            n();
        } else
            m();
    }

    void a(hc ahc[], File afile[]) {
        String s1 = i.d();
        e.a(g, ahc, afile, f, new wu(s1));
    }

    public void propertyChange(PropertyChangeEvent propertychangeevent) {
        if (propertychangeevent.getPropertyName().equals(z[9])) {
            File afile[] = (File[]) propertychangeevent.getNewValue();
            if (afile != null && afile.length > 0) {
                a(true);
                b(true);
            } else {
                a(false);
                b(false);
            }
        } else if (propertychangeevent.getPropertyName().equals(z[8])) {
            File file = (File) propertychangeevent.getNewValue();
            if (l.add(file))
                k.addElement(file);
            d(true);
            c(true);
        }
    }

    void q() {
        s.setEnabled(false);
        t.setEnabled(false);
        s();
    }

    void r() {
        k = new DefaultListModel();
        l = new HashSet();
        j.setModel(k);
        m.validate();
    }

    void s() {
        zz.b(i);
        s.setEnabled(false);
    }

    void t() {
        Object aobj[];
        int j1;
        aobj = j.getSelectedValues();
        for (j1 = 0; j1 < aobj.length; j1++) {
            l.remove(aobj[j1]);
            k.removeElement(aobj[j1]);
        }
        if (k.getSize() == 0)
            t.setEnabled(false);
    }

    void u() {
        Cursor cursor = new Cursor(0);
        setCursor(cursor);
    }

    void a(boolean flag) {
        q.setEnabled(flag);
    }

    void b(boolean flag) {
        r.setEnabled(flag);
    }

    void c(boolean flag) {
        t.setEnabled(flag);
    }

    void d(boolean flag) {
        s.setEnabled(flag);
    }

    void v() {
        Cursor cursor = new Cursor(3);
        setCursor(cursor);
    }

    public void a(String s1, String s2, String s3, nc anc[]) {
        Container container;
        j0 j0_1;
        container = getContentPane();
        j0_1 = new j0(container);
        container.setLayout(j0_1);
        addWindowListener(new ab(this));
        qz aqz[] = {
                new uz()
        };
        File file = null;
        if (s3 != null) {
            File file1 = new File(s3);
            if (file1.exists() && file1.isDirectory())
                file = file1;
        }
        i = new m4(file, true, 3, aqz, 0, false);
        container.add(i, z[10]);
        i.addPropertyChangeListener(this);
        h = new JLabel(z[20]);
        m = new JPanel();
        m.setLayout(new BorderLayout());
        container.add(m, z[15]);
        k = new DefaultListModel();
        l = new HashSet();
        j = new v3(k);
        j.setSelectionMode(2);
        j.setToolTipText(to.b(to.ib));
        m.add(new q4(j), z[19]);
        container.add(h, z[17]);
        if (anc != null && anc.length > 0) {
            for (int j1 = 0; j1 < anc.length; j1++) {
                File file2 = new File(anc[j1].d());
                k.addElement(file2);
                l.add(file2);
            }
        }
        go go1 = new go(this);
        j.addListSelectionListener(go1);
        j.addMouseListener(go1);
        j.addKeyListener(go1);
        q = new JButton(">");
        q.setToolTipText(to.b(to.jb));
        fo fo1 = new fo(this);
        q.addActionListener(fo1);
        q.addKeyListener(fo1);
        container.add(q, z[14]);
        r = new JButton(z[13]);
        r.setToolTipText(to.b(to.kb));
        r.addActionListener(fo1);
        r.addKeyListener(fo1);
        container.add(r, z[18]);
        s = new JButton("<");
        s.setToolTipText(to.b(to.lb));
        ho ho1 = new ho(this);
        s.addActionListener(ho1);
        s.addKeyListener(ho1);
        container.add(s, z[21]);
        t = new JButton(z[16]);
        t.setToolTipText(to.b(to.mb));
        t.addActionListener(ho1);
        t.addKeyListener(ho1);
        container.add(t, z[12]);
        StringBuffer stringbuffer = new StringBuffer(z[11]);
        a(j0_1, s2, stringbuffer, container);
        j0_1.e(stringbuffer.toString());
        setTitle(s1);
        setIconImage(zo.a(this));
        setSize(550, 400);
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension dimension1 = getSize();
        int k1 = dimension.width / 2 - dimension1.width / 2;
        int l1 = dimension.height / 2 - dimension1.height / 2;
        setLocation(k1, l1);
    }

    void a(j0 j0_1, String s1, StringBuffer stringbuffer, Container container) {
        n = new JButton(s1);
        n.setToolTipText(to.b(to.nb));
        n.addActionListener(this);
        n.addKeyListener(this);
        container.add(n, z[27]);
        o = new JButton(z[26]);
        o.setToolTipText(to.b(to.Z));
        o.addActionListener(this);
        o.addKeyListener(this);
        container.add(o, z[24]);
        p = new JButton(z[22]);
        p.setToolTipText(to.b(to.ab));
        p.addActionListener(this);
        p.addKeyListener(this);
        container.add(p, z[25]);
        stringbuffer.append(z[23]);
    }

    private static String dees(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x2e;
                    break;
                case 1:
                    key = 42;
                    break;
                case 2:
                    key = 55;
                    break;
                case 3:
                    key = 95;
                    break;
                default:
                    key = 58;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[28];
        as[0] = "hC[:\032kXE0H";
        as[1] = "\t\n\r\177";
        as[2] = "\000@V;";
        as[3] = "`E\027<VOYD\177\\GFR,\032YOE:\032HEB1^\016CY\177NFO\027,_BOT+_J\nS6HKIC0HGOD\177U\\\nV-YFCA:I";
        as[4] = "HC[:\024]OG>HO^X-";
        as[5] = "mEB3^\016DX+\032MXR>NK\nC:W^EE>HW\nQ6VK\n^1\032\t";
        as[6] = "`E\027;S\\OT+U\\CR,\032AX\027>HMB^)_]\n@:HK\nD:VKIC:^";
        as[7] = "kXE0H";
        as[8] = "HCY>V}O[:YZCX1";
        as[9] = "]O[:YZCX1yFKY8_J";
        as[10] = "HC[:iKFR<NAX";
        as[11] = "BKN0OZ\004Z6TyCS+R\023GV5U\\hC1mGNC7\020\032\001\005j\001BKN0OZ\004Z6TfO^8RZ\027\004o\n\025G^1U\\hC1rKCP7N\023GV'\022ONS\035N@\004S:\\O_[+rKCP7N\002\nV;^~FB,xZD\031;_HKB3NfO^8RZ\006\027-_CEA:xZD\031;_HKB3NfO^8RZ\006\027-_CEA:{BFu+T\000NR9[[FC\027_GM_+\023\025G^1U\\hC1mGNC7\007CKOw[JNu+T\000NR9[[FC\bSJ^_s\032ONS\017V[Yu+T\000NR9[[FC\bSJ^_s\032\\OZ0LKhC1\024JOQ>OB^`6^ZB\033\177HKGX)_oF[\035N@\004S:\\O_[+mGNC7\023\025BV3\\cCY0Hl^Y\bSJ^_bWGDX-xZD`6^ZB\030m\001MEY+[GDR-yKDC:Hv\027T0TZK^1_\\\004@6^ZB\035j\n\001\033\007o\001HC[:iKFR<NAX\031+U^\027\006d\\GFR\f_BOT+U\\\004[:\\Z\027\002d\\GFR\f_BOT+U\\\004U0NZEZbYADC>S@OEqXA^C0W\003GV5U\\hC1rKCP7N\003\033\007d\\GFR\f_BOT+U\\\004E6]F^\n<U@^V6TKX\031(SJ^_p\b\016\007\0277[BLz6TAXu+TyCS+R\016\007\027j\001]O[:YZOS\033S\\fU3\024ZEGb\013\025YR3_M^R;~GX{=V\000FR9N\023IX1NOCY:H\000]^;NF\005\005\177\021\016BV3\\cCY0Hl^Y\bSJ^_\177\021\016\033\007d^GXg>TKF\031+U^\027D:VKIC:^jCE\023XB\004U0NZEZt\b\025N^-jODR3\024BOQ+\007]O[:YZOS\033S\\fU3\024BOQ+\001JCE\017[@O[qXA^C0W\023IX1NOCY:H\000BR6]F^\0322[DEE\035N@bR6]F^\032n\n\025N^-jODR3\024\\CP7N\023IX1NOCY:H\000]^;NF\007\002d[JNu+T\000IR1NKXobYADC>S@OE\034_@^R-b\025KS;xZD\031<_@^R-c\023IX1NOCY:H\000BR6]F^\035l\n\001\033\007o\001ONS\035N@\004@6^ZB\n2S@EE\035N@}^;NF\021V;^l^YqRKCP7N\023G^1U\\hC1rKCP7N\025KS;jB_D\035N@\004T:TZOE\007\007MEY+[GDR-yKDC:Hv\021V;^~FB,xZD\031<_@^R-c\023IX1NOCY:H\000BR6]F^\035k\t\001\033\007o\001ONS\017V[Yu+T\000]^;NF\027Z6TAXu+TyCS+R\025KS;jB_D\035N@\004_:SIBCbWGDX-xZD\177:SIBCdHKGX)_l^YqYKDC:Hv\027T0TZK^1_\\iR1NKXodHKGX)_l^YqYKDC:Hw\027T0TZK^1_\\\004_:SIBCu\017\030\005\006o\n\025XR2UXOu+T\000]^;NF\027Z6TAXu+TyCS+R\025XR2UXOu+T\000BR6]F^\n2S@EE\035N@bR6]F^\f-_CEA:{BFu+T\000IR1NKXobYADC>S@OE\034_@^R-b\025XR2UXOv3Vl^YqYKDC:Hw\027T0TZK^1_\\\004_:SIBCu\f\027\005\006o\n\025XR2UXOv3Vl^YqMGNC7\007CCY0Hl^Y\bSJ^_dHKGX)_oF[\035N@\004_:SIBCbWGDX-xZD\177:SIBCd";
        as[12] = "\\OZ0LKk[3xZD";
        as[13] = "\020\024";
        as[14] = "ONS\035N@";
        as[15] = "JCE\017[@O[";
        as[16] = "\022\026";
        as[17] = "]O[:YZOS\033S\\fU3";
        as[18] = "ONS\017V[Yu+T";
        as[19] = "mOY+_\\";
        as[20] = "}O[:YZOS\177|AFS:H]\nV1^\016kE<RG\\R,";
        as[21] = "\\OZ0LKhC1";
        as[22] = "fO[/";
        as[23] = "AAu+T\000^X/\007JCE\017[@O[qXA^C0W\005\037\f0Ql^YqYKDC:Hv\027T0TZK^1_\\\004@6^ZB\035n\f\001\033\007o\001AAu+T\000]^;NF\027Z>PAXu+TyCS+R\025E\\\035N@\004_:SIBCbWO@X-xZD\177:SIBCdYODT:Vl^YqNAZ\n0Ql^YqNAZ\f<[@IR3xZD\031<_@^R-b\023IX1NOCY:H\000]^;NF\000\002o\025\037\032\007dYODT:Vl^YqMGNC7\007CK]0Hl^Y\bSJ^_dYODT:Vl^YqRKCP7N\023GV5U\\hC1rKCP7N\025BR3Jl^YqNAZ\n0Ql^YqNAZ\f7_BZu+T\000IR1NKXobYADC>S@OEqMGNC7\020\026\036\030n\n\036\021_:V^hC1\024YCS+R\023GV5U\\hC1mGNC7\001FO[/xZD\0317_GM_+\007CK]0Hl^Y\027_GM_+\001CK]0Hl^Y\027_GM_+\007CKOwUEhC1\024JOQ>OB^\177:SIBCs\032MKY<_BhC1\024JOQ>OB^\177:SIBCs\032FO[/xZD\031;_HKB3NfO^8RZ\003\f2[DEE\035N@}^;NF\027Z>B\006E\\\035N@\004S:\\O_[+mGNC7\026\016IV1YKFu+T\000NR9[[FC\bSJ^_s\032FO[/xZD\031;_HKB3NyCS+R\007";
        as[24] = "MKY<_BhC1";
        as[25] = "FO[/xZD";
        as[26] = "mKY<_B";
        as[27] = "AAu+T";
        for (int i = 0; i < as.length; i++) {
            as[i] = dees(as[i].toCharArray());
        }
        z = as;

    }
}